<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Error extends MY_Controller {
	
	public function __construct()
	{
		parent::__construct();
		$this->lang->load('candidate', $this->session->userdata['user_lang']);
	}
	
	public function index()
	{
		$page_data = array();
		$page_data['main_content'] = 'error/index';
		$page_data['page_title'] = $this->lang->line('global_errortitle');
		$page_data['userdata'] = $this->session->userdata;
		$template_name = $this->is_logged() ? ('template-' . $this->get_profile_type()) : 'template-portal';
		$this->load->view($template_name, $page_data);
	}
	
	public function page_missing()
	{
		$page_data = array();
		$page_data['main_content'] = 'error/page_missing';
		$page_data['page_title'] = $this->lang->line('global_pagemissingtitle');
		$page_data['userdata'] = $this->session->userdata;
		$template_name = $this->is_logged() ? ('template-' . $this->get_profile_type()) : 'template-portal';
		$this->load->view($template_name, $page_data);
	}
}

?>